package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFillInsert;
import com.sky.annotation.AutoFillUpdate;
import com.sky.entity.Category;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface CategoryMapper {
    Page<Category> seleceByPage(Category category);

    @AutoFillInsert
    void insert(Category category);

    @AutoFillUpdate
    void updateStatusById(Category category);

    List<Category> SelectByType(Category category);

    //Category SelectById(Category category);

    @Delete("delete  from sky_take_out.setmeal where id=#{id}")
    void deleteById(Long id);
}
